<%--
  Created by IntelliJ IDEA.
  User: dell
  Date: 2021/1/13
  Time: 17:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>商品信息维护</title>
    <script src="../element/vue.js"></script>
    <link rel="stylesheet" href="../element/index.css">
    <script src="../element/index.js"></script>
    <link rel="stylesheet" type="text/css" href="../styles/basc.css">
</head>
<body>
<div id="app">
    <%@ include file="../includes/hear.jsp" %>
    <div class="left">
        <%@ include file="../includes/menu.jsp" %>
    </div>
    <div class="right">
        <div class="operation" style="margin-left: 10px;padding-top: 10px;width: 200px;">验证删除信息↓：<span class="mess" id="PmDpMess">${sessionScope.PmDpMess}</span></div>
        <div style="width: 380px;margin-left: 170px;margin-top: 40px;">
            <table class="dt" border="0" cellspacing="1">
                <tr>
                    <th>序号</th>
                    <th>商品编号</th>
                    <th>商品名称</th>
                    <th>商品数量</th>
                    <th>商品类别</th>
                    <th>供应商</th>
                    <th>修改</th>
                    <th>删除</th>
                </tr>
                <c:forEach items="${sessionScope.mp.data}" var="record" varStatus="rows">
                    <tr>
                        <td>${(mp.pageNo-1)*mp.pageSize+rows.count}</td>
                        <td>${record.zid}</td>
                        <td>${record.zname}</td>
                        <td>${record.zcount}</td>
                        <td>${record.gid}</td>
                        <td>${record.sup_name}</td>
                        <td><a href="${webroot}/Pformation/mation.do?id=${record.zid}&ainto=update1">修改</a></td>
                        <td><a href="${webroot}/Pformation/mation.do?id=${record.zid}&ainto=delete">删除</a></td>
                    </tr>
                </c:forEach>
            </table>
            <div class="pagenav">${sessionScope.mp.pageNav}</div>
        </div>
        <div class="operation" style="margin-left: 10px;padding-top: 10px;width: 200px;">验证修改信息↓：<span class="mess" id="PmUpMess">${sessionScope.PmUpMess}</span></div>
        <div style="margin-left: 30px;margin-top: 20px;">
            <input type="text" placeholder="商品编号" style="width: 100px;" value="${sessionScope.zgoods.zid}" id="zidd" name="zidd" readonly>
            <input type="text" placeholder="商品名称" style="width: 100px;" value="${sessionScope.zgoods.zname}" id="zname" name="zname">
            <input type="text" placeholder="商品数量" style="width: 100px;" value="${sessionScope.zgoods.zcount}" id="zcount" name="zcount">
            <input type="text" placeholder="类别编号" style="width: 100px;" value="${sessionScope.zgoods.gid}" id="gid" name="gid">
            <input type="text" placeholder="供应商" style="width: 100px;" value="${sessionScope.zgoods.sup_name}" id="supname" name="supname">
            <el-button type="primary" plain style="width: 80px;" @click="xg()">修改</el-button>
        </div>
    </div>
</div>
</body>
<script>
    new Vue({
        el:'#app',
        methods:{
            xg(){
                var log ={
                    zid: document.getElementById("zidd").value,
                    zname:document.getElementById("zname").value,
                    zcount:document.getElementById("zcount").value,
                    gid:document.getElementById("gid").value,
                    supname:document.getElementById("supname").value

                }
                window.location.href="${webroot}/Pformation/mation.do?ainto=update&c=" + JSON.stringify(log)
            }
        }
    })
</script>
</html>
